package com.oop7.OldDriver;

public class Ship {

	private double weight;
	private double displacement;
	private int speed;

	public double getWeight() {
		return weight;
	}

	public void setWeight(double weight) {
		this.weight = weight;
	}

	public double getDisplacement() {
		return displacement;
	}

	public void setDisplacement(double displacement) {
		this.displacement = displacement;
	}

	public int getSpeed() {
		return speed;
	}

	public void setSpeed(int speed) {
		this.speed = speed;
	}

	public void start() {
		System.out.println("轮船起航");
	}

	public void whistle() {
		System.out.println("轮船鸣笛");
	}

	public void anchor() {
		System.out.println("轮船抛锚");
	}

	public Ship(double weight, double displacement, int speed) {
		setWeight(weight);
		setDisplacement(displacement);
		setSpeed(speed);

	}

}
